﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_friendsite.Aspx.cs"
    Inherits="Master_admin_friendsite" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="Css/Css.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form runat="server">
    <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
        <tr>
            <td colspan="2" align="center" class="title">
                <strong>友 情 链 接 管 理</strong>
            </td>
        </tr>
        <tr class="tdbg">
            <td width="70" height="30">
                <strong>管理导航：</strong>
            </td>
            <td height="30">
                <a href="Admin_FriendSite.Aspx?Action=Add&SiteAdmin=<%=Un %>">添加友情链接</a>&nbsp;|&nbsp;<a href="Admin_FriendSite.Aspx?LinkType=2&SiteAdmin=<%=Un %>">文字链接</a>&nbsp;|&nbsp;<a
                    href="Admin_FriendSite.Aspx?LinkType=1&SiteAdmin=<%=Un %>">LOGO链接</a>&nbsp;|<a href="Admin_FriendSite.Aspx?LinkType=3&SiteAdmin=<%=Un %>">合作伙伴链接</a>|&nbsp;<a
                        href="Admin_FriendSite.Aspx">所有链接</a>
            </td>
        </tr>
    </table>
    <asp:Panel ID="Pl_Manager" runat="server">
        <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
            <tr class="title">
                <td height="30" align="center">
                    链接类型
                </td>
                <td height="30" align="center">
                    网站名称
                </td>
                <td height="30" align="center">
                    网站LOGO
                </td>
                <td height="30" align="center">
                    添加用户
                </td>
                <td height="30" align="center">
                    所属栏目
                </td>                
                <td height="30" align="center">
                    推荐/审核
                </td>
                <td height="30" align="center">
                    操作
                </td>
            </tr>
            <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                <ItemTemplate>
                    <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#cccccc'"
                        style="padding: 0px 2px;">
                        <td height="30" align="center">
                            <%#Create.LinkType(AspNetCs.Common.StringHelper.isNumber_int(Eval("LinkType").ToString()))%>
                        </td>
                        <td align="center">
                            <%#Eval("SiteName")%>
                        </td>
                        
                        <td align="center">
                            <%#LinkPic(Eval("logoUrl").ToString(),Convert.ToInt32(Eval("linkType").ToString()))%>
                        </td>
                        <td align="center">
                            <a href="Admin_friendsite.Aspx?LinkType=<%=linktype %>&Un=<%#Eval("SiteAdmin")%>"><%#Eval("SiteAdmin")%></a>
                        </td>
                        
                <td height="30" align="center">
                    <%#channelType(Eval("channel").ToString())%>
                </td>                         
                        
                        
                        <td align="center">
                            <%#Eval("IsGood").ToString()=="1" ?"推荐":"正常"%>&nbsp;/&nbsp;<%#Eval("IsCheck").ToString()=="1" ?"审核":"<span style='color:red'>未审核</span>"%>
                        </td>
                        <td align="center">
                            <asp:LinkButton ID="btn_modify" runat="server" CommandArgument='<%#Eval("id") %>'
                                CommandName="Modify">修改</asp:LinkButton>
                            <asp:LinkButton ID="btn_del" runat="server" CommandArgument='<%#Eval("id") %>' CommandName="delete"
                                OnClientClick="javascript:return confirm('是否真的删除,此操作将不可恢复!')">删除</asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <asp:Panel ID="pl_nothing" runat="server" Visible="false">
                        <tr>
                            <td colspan="8">
                                暂时没有任何友情链接数据
                            </td>
                        </tr>
                    </asp:Panel>
                </FooterTemplate>
            </asp:Repeater>
            <tr class="tdbg">
                <td colspan="7" height="25" align="right">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged"
                        CurrentPageButtonPosition="Beginning" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                        LayoutType="Table" NumericButtonTextFormatString="[{0}]" PageIndexBoxType="DropDownList"
                        PageSize="15" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                        TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" UrlPaging="True" AlwaysShow="True">
                    </webdiyer:AspNetPager>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel ID="Pl_Set" runat="server" Visible="false">
        <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
            <tr>
                <td colspan="2" align="center" class="title">
                    <strong>
                        <%=TextChange%>友情链接信息</strong>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>链接类型：</strong>
                </td>
                <td height="25">
                    <asp:RadioButtonList ID="types" runat="server" RepeatColumns="3">
                        <asp:ListItem Selected="True" Value="2">文字链接</asp:ListItem>
                        <asp:ListItem Value="1">图片链接</asp:ListItem>
                        <asp:ListItem Value="3">合作伙伴</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25" valign="middle">
                    <strong>网站名称：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="LinkName" runat="server" Width="192px"></asp:TextBox><font color="#FF6600">*</font><asp:RequiredFieldValidator
                        ID="RequiredFieldValidator1" runat="server" ControlToValidate="LinkName" Display="Dynamic"
                        ErrorMessage="友情链接网站名称不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>网站地址：</strong>
                </td>
                <td height="25">
                    <font color="#FF6600">
                        <asp:TextBox ID="LinkUrl" runat="server" Width="364px"></asp:TextBox>*<asp:RequiredFieldValidator
                            ID="RequiredFieldValidator2" runat="server" ControlToValidate="LinkUrl" Display="Dynamic"
                            ErrorMessage="友情链接网站地址不能为空"></asp:RequiredFieldValidator></font>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>网站Logo：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="LinkLogo" runat="server" Height="22px" Width="366px"></asp:TextBox>&nbsp;
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>站长姓名：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="MasterName" runat="server" Width="191px"></asp:TextBox>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>电子邮件：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="Email" runat="server" Width="363px"></asp:TextBox>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>网站密码：</strong><br>
                    <font color="#0066cc">若不修改，请保持为空</font>
                </td>
                <td height="25">
                    <asp:TextBox ID="Pwd" runat="server" Width="191px" TextMode="Password"></asp:TextBox>&nbsp;
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>确认密码：</strong>
                </td>
                <td height="25">
                    <asp:TextBox ID="ConfirmPwd" runat="server" TextMode="Password" Width="191px"></asp:TextBox>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300">
                    <strong>网站简介：</strong>
                </td>
                <td valign="middle">
                    <asp:TextBox ID="Readme" runat="server" Height="114px" TextMode="MultiLine" Width="529px"></asp:TextBox><br />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="Readme"
                        Display="Dynamic" ErrorMessage="网站简介最多只能二百字" ValidationExpression="^(.|\n){0,200}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>推荐站点：</strong>
                </td>
                <td height="25" valign="middle">
                    <asp:RadioButtonList ID="ontop" runat="server" RepeatColumns="3">
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="tdbg">
                <td width="300" height="25">
                    <strong>审核通过：</strong>
                </td>
                <td height="25" valign="middle">
                    <asp:RadioButtonList ID="ischeck" runat="server" RepeatColumns="3">
                        <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr class="tdbg">
                <td height="40" colspan="2" align="center">
                    <input name="Action" type="hidden" id="Action" value="SaveModify">
                    <asp:HiddenField ID="CurrID" runat="server" />
                    <asp:Button ID="Button2" runat="server" Style="cursor: hand; background-color: #cccccc;"
                        Text="  确     定  " OnClick="Button2_Click" />&nbsp;<asp:Button ID="Button1" runat="server"
                            Style="cursor: hand; background-color: #cccccc;" Text="  修    改  " OnClick="Button1_Click1" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    </form>
</body>
</html>
